package com.muyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyi.mapper.CategoryTagMapper;
import com.muyi.pojo.entity.CategoryTag;
import com.muyi.service.CategoryTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author VRMMO
 * @description 针对表【category_tag】的数据库操作Service实现
 * @createDate 2025-06-11 15:04:41
 */
@Service
public class CategoryTagServiceImpl extends ServiceImpl<CategoryTagMapper, CategoryTag>
        implements CategoryTagService{
    @Autowired
    private CategoryTagMapper categoryTagMapper;

    @Override
    public List<CategoryTag> list() {
        return categoryTagMapper.list();
    }

    @Override
    public void delete(Integer category_tag_id) {
        categoryTagMapper.deleteById(category_tag_id);
    }

    @Override
    public void add(CategoryTag CategoryTag) {
        categoryTagMapper.insert(CategoryTag);
    }

    @Override
    public void update(CategoryTag CategoryTag) {
        categoryTagMapper.update(CategoryTag);
    }

    @Override
    public CategoryTag getByCategoryTagId(Integer category_tag_id) {
        return categoryTagMapper.getByCategoryTagId(category_tag_id);
    }


}




